package com.xd.service.admin.XTGLY.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xd.Entity.EntityBrand;
import com.xd.Entity.ProductEntity;
import com.xd.Mapper.BrandMapper;
import com.xd.service.admin.XTGLY.BrandlikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.XTGLY.brandParam;

import java.util.List;

@Service
public class BrandlikeServiceImpl implements BrandlikeService {
    @Autowired
    BrandMapper brandMapper;

    @Override
    public PageInfo<EntityBrand> getBrand(brandParam brandParam) {
        PageHelper.startPage(brandParam.getNum(), brandParam.getPageSize());
        List<EntityBrand> productList = brandMapper.queryProducBrandts(brandParam);
        return new PageInfo<>(productList);
    }
}
